<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateEnvInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('env_info', function (Blueprint $table) {
            $table -> increments('id');
            $table -> string('temperature',20) -> notNull();
            $table -> string('air_humidity',30) -> notNull();
            $table -> string('soil_humidity',30) -> notNull();
            $table -> string('light_intensity',30);
            $table -> string('co2',30);
            $table -> tinyInteger('shed_id');
            $table -> timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('env_info');
    }
}
